/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sessionbeans.stateless;

import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import jpa.facade.PacienteFacade;

/**
 * Bean de Sessão stateless, que contém métodos de negócios relacionados
 * à entidade Paciente.
 * @author Issao Hanaoka Junior
 */
@Stateless
public class PacienteBean implements PacienteBeanRemote {

    @Inject
    private PacienteFacade pacienteFacade;
    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

    /**
     * Método que retorna todos os pacientes do BD.
     * @return lista (List) de pacientes
     */
    @Override
    public List buscaPacientes() {
        return pacienteFacade.findAll();
    }
}
